﻿
using DotXxlJob.Core;
using DotXxlJob.Core.Model;
using XxlJobDotNetCore.Services;
using Newtonsoft.Json;

namespace XxlJobDotNetCore.Handler
{
    /// <summary>
    /// 测试Handler，请不要删除
    /// </summary>
    [JobHandler("TestTaskNetTestHandler")]
    public class TestTaskNetTestHandler : AbstractJobHandler
    {
        private readonly TestJobService _jobService;
        public TestTaskNetTestHandler(TestJobService jobService)
        {
            _jobService = jobService;
        }

        public async override Task<ReturnT> Execute(JobExecuteContext context)
        {
           await Task.Run(()=> _jobService.Test(context.JobParameter));
            return await Task.FromResult(ReturnT.SUCCESS);
        }
    }
}
